package com.vhall.component.entity.guosen.enums;

import com.vhall.component.entity.dictionary.enums.BaseEnum;

/**
 * FollowEnum-
 *
 * @author xing.wang
 * @date 2023/11/7
 */
public enum FollowEnum implements BaseEnum {
    IS_FOLLOW("1","已关注")
    ,NOT_FOLLOW("0","未关注")
    ;

    private String value;
    private String name;

    FollowEnum(String value, String name) {
        this.name = name;
        this.value = value;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String getName() {
        return name;
    }
    /**
     * 通过 value 获取 name
     * @param value
     * @return
     */
    public static String getNameByValue(String value) {
        for (FollowEnum e : FollowEnum.values()) {
            if (e.getValue().equals(value)) {
                return e.getName();
            }
        }
        return null;
    }
}
